import request from '@/utils/request'

const prevUrl = '/asset/maintenance/';

export default {
  // 查询
  list(query, pageReq) {
    return request({
      url: `${prevUrl}list`,
      method: 'post',
      data: query,
      params: pageReq
    })
  },
  // 详情
  getDetail(id) {
    return request({
      url: `${prevUrl}detail/${id}`
    })
  },
  // 保存
  save(itemId, data) {
    return request({
      url: `${prevUrl}save/${itemId}`,
      method: 'post',
      data: data
    })
  }
}

